home *** CD-ROM | disk | FTP | other *** search
- Path: uu4news.netcom.com!dodge!not-for-mail
- From: eddy@clipper.robadome.com (eddy Gorsuch)
- Newsgroups: comp.lang.c++
- Subject: Re: Name-mangling standard
- Date: 12 Jan 1996 13:41:29 -0800
- Organization: Siemens Rolm Communications Inc.
- Message-ID: <4d6ki9$6e3@eclipse.eng.sc.rolm.com>
- References: <20c.32169.607@newage.com.ar> <4bsnbu$5mu@mujibur.inmind.com> <30EDC013.7C780E5E@cims.nyu.edu> <DL1pqE.KKq@infosoft.com>
- NNTP-Posting-Host: eclipse.eng.sc.rolm.com
-
- In article <DL1pqE.KKq@infosoft.com>, John Galt <jgalt@infosoft.com> wrote:
- >I beg to differ. Name mangling serves several indispensible functions:
- >
- >1. It makes it possible to have more than one function with the same name
- >(differing in their argument lists). To do this without mangling, the linker
- >would have to see not just a function name, or even class::name, but a full
- >_prototype_ for each function (omitting variable names and the result type).
- >
- >2. It allows the linker to do error checking. Example: Module A calls
- >foo() in module B. I change the definition of foo (and its argument list)
- >but forget to change A. Without name mangling, the program will simply crash
- >(or do strange things because I've clobbered the stack...)
- [...]
- >In short, wanting to eliminate name mangling is like wanting a compiler that
- >never prints error messages. It's for people who would rather walk off a
- >cliff than have someone tell them they're about to.
-
- But if a linker understood the name "foo::bar(char*&, const char *)", would
- name mangling be necessary? If the linker allowed special characters in its
- names, both problems listed above are solved without mangling the name.
-
- eddy
- --
- ed.dy \'ed-e-\ n [ME (Sc dial.) ydy, prob. fr. ON itha; akin to OHG ith-
- again], L et and 1a: a current of water or air running contrary to the main
- current; esp)X : a small whirlpool 1b: a substance moving similarly 2: a
- contrary or circular current - eddy vb
-